import 'package:flutter_menu/model/app_update_model.dart';
import 'package:flutter_menu/model/login_model.dart';
import 'package:flutter_menu/model/menu_model.dart';
import 'package:flutter_menu/model/order_model.dart';
import 'package:retrofit/retrofit.dart';
import 'package:dio/dio.dart' hide Headers;

import '../model/net_result.dart';


part 'menu_api.g.dart';

@RestApi()
abstract class MenuApi {
  factory MenuApi(Dio dio, {String baseUrl}) = _MenuApi;



  @GET("/electronicMenu/data")
  Future<NetResult<SyncResModel>> getSyncData(
      @Query('token')  String token,@Query('type') String? type);


  @POST('/electronicMenu/init')
  Future<NetResult<String>> bind(@Body() LoginReq body);

  @GET("/electronicMenu/getNewestVersion")
  Future<NetResult<AppVersion>> getAppVersion(
      @Query('shopId')  String shopId );


  @POST('/electronicMenu/order/place')
  Future<NetResult<OrderResp>> order(@Body() OrderRq body);

  @POST('/electronicMenu/order/query')
  Future<NetResult<OrderRecordListResp>> getOrderRecordList(@Body() Map<String,dynamic> body);
}

